<h1>会员中心</h1>
<div></div>
<script>
    let localUname=(new Date).getTime() > localStorage.getItem('expires') ? null:localStorage.getItem('uname');
    let sessionUname=sessionStorage.getItem('uname');
    if((new Date).getTime() > localStorage.getItem('expires')){
        localStorage.clear();
    }
    let uname=localUname || sessionUname;
    if(uname){
        document.querySelector('div').innerHTML=`<p>${uname}</p><a href="./logout.html">退出</a>`
    }else{
        document.querySelector('div').innerHTML=`<a href="./login.html">登录</a>`
    }
</script>